/*
 * Template Name: Film Reel
 * Author: Manus AI
 * Description: A nostalgic, timeline-based movie template with a film reel aesthetic.
 */

@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Roboto:wght@400;700&display=swap');

body {
    background-color: #FAF0E6; /* Old Paper */
    color: #2C1810; /* Dark Text */
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.fr-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* --- Typewriter Font --- */
.fr-typewriter {
    font-family: 'Special Elite', cursive;
}

/* --- Header & Navigation --- */
.fr-header {
    padding: 20px 0;
    text-align: center;
}

.fr-logo img {
    max-width: 180px;
    filter: sepia(0.5);
}

.fr-nav {
    padding: 10px 0;
    text-align: center;
}

.fr-nav a {
    color: #4E342E;
    text-decoration: none;
    margin: 0 10px;
    font-size: 1.1em;
}

.fr-nav a:hover {
    text-decoration: underline;
}

.fr-breadcrumb {
    padding: 15px 0;
    font-size: 0.9em;
}

.fr-breadcrumb a {
    color: #4E342E;
}

/* --- Sepia Image Filter --- */
.fr-sepia {
    filter: sepia(0.7);
    transition: filter 0.3s ease;
}

.fr-sepia:hover {
    filter: sepia(0);
}

/* --- Timeline Layout --- */
.fr-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #F5DEB3;
    transform: translateX(-50%);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.fr-timeline-item {
    padding: 40px 0;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.fr-timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 60px;
    text-align: right;
}

.fr-timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 60px;
    text-align: left;
}

.fr-timeline-item::after {
    content: '';
    position: absolute;
    top: 50px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4E342E;
    border: 4px solid #F5DEB3;
}

.fr-timeline-item:nth-child(odd)::after {
    right: -14px;
}

.fr-timeline-item:nth-child(even)::after {
    left: -14px;
}

.fr-timeline-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border: 2px dashed #4E342E;
    border-radius: 8px;
    position: relative;
}

/* --- Film Reel Border --- */
.fr-film-border {
    position: relative;
    padding: 15px;
    background-color: #2C1810;
    box-shadow: 0 0 10px rgba(0,0,0,0.5) inset;
}

.fr-film-border::before, .fr-film-border::after {
    content: '';
    position: absolute;
    left: 5px; right: 5px;
    height: 10px;
    background-image: repeating-linear-gradient(-45deg, #FAF0E6, #FAF0E6 2px, transparent 2px, transparent 6px);
}

.fr-film-border::before {
    top: 5px;
}

.fr-film-border::after {
    bottom: 5px;
}

.fr-film-border img {
    display: block;
    width: 100%;
}

/* --- Content & List Pages --- */
.fr-list-item {
    margin-bottom: 30px;
}

.fr-show-page .fr-title {
    font-size: 3em;
    text-align: center;
    margin: 40px 0;
    color: #4E342E;
}

.fr-show-page .fr-content-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.8;
    font-size: 1.1em;
    border-top: 1px solid #F5DEB3;
    border-bottom: 1px solid #F5DEB3;
}

.fr-recommendations {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.fr-recommendations .fr-item {
    text-align: center;
}

/* --- Sidebar --- */
.fr-sidebar {
    padding: 20px;
    background: rgba(245, 222, 179, 0.2);
    border-left: 1px solid #F5DEB3;
}

.fr-sidebar-widget {
    margin-bottom: 30px;
}

.fr-sidebar-widget h3 {
    border-bottom: 2px solid #4E342E;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-family: 'Special Elite', cursive;
}

.fr-sidebar-widget ul {
    list-style: none;
    padding: 0;
}

.fr-sidebar-widget ul li a {
    color: #4E342E;
    text-decoration: none;
}

/* --- Footer --- */
.fr-footer {
    background-color: #4E342E;
    color: #FAF0E6;
    padding: 40px 0 20px;
    margin-top: 50px;
    text-align: center;
}

.fr-footer .fr-links {
    margin-bottom: 20px;
}

.fr-footer .fr-links a {
    color: #F5DEB3;
    margin: 0 10px;
    text-decoration: none;
}

.fr-footer .fr-copyright {
    font-size: 0.9em;
}

/* --- Pagination --- */
.fr-pagination {
    text-align: center;
    padding: 30px 0;
}

.fr-pagination a, .fr-pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #4E342E;
    color: #4E342E;
    text-decoration: none;
    border-radius: 4px;
}

.fr-pagination .current {
    background-color: #4E342E;
    color: #FAF0E6;
}


/* ========== 差异化特效 ========== */
/* ==========================================
   胶片时光 (Film Time) 专属CSS特效
   前缀: fr-
   风格: 暖黄深棕复古系
========================================== */

/* 1. 胶片颗粒噪点效果 (Film Grain) */
@keyframes fr-film-grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1%, -1%); }
    20% { transform: translate(1%, 1%); }
    30% { transform: translate(-2%, -2%); }
    40% { transform: translate(2%, 2%); }
    50% { transform: translate(-1%, 1%); }
    60% { transform: translate(1%, -1%); }
    70% { transform: translate(2%, 1%); }
    80% { transform: translate(-1%, -2%); }
    90% { transform: translate(1%, 2%); }
}

.fr-grain-overlay {
    position: fixed;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.08"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 9999;
    animation: fr-film-grain 0.6s steps(2) infinite;
    opacity: 0.6;
}

/* 2. 放映机闪烁效果 (Projector Flicker) */
@keyframes fr-projector-flicker {
    0% { opacity: 1; }
    3% { opacity: 0.9; }
    6% { opacity: 0.95; }
    9% { opacity: 1; }
    12% { opacity: 0.85; }
    15% { opacity: 1; }
    50% { opacity: 1; }
    52% { opacity: 0.9; }
    54% { opacity: 1; }
    100% { opacity: 1; }
}

.fr-flicker-text {
    animation: fr-projector-flicker 4s infinite;
    color: #d4b886;
    text-shadow: 0 0 5px rgba(212, 184, 134, 0.4);
}

/* 3. 胶片卷轴旋转 (Reel Spin) */
@keyframes fr-reel-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fr-loading-reel {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px dashed #8b5a2b;
    border-radius: 50%;
    animation: fr-reel-spin 2s linear infinite;
}

/* 4. 图片hover老电影色调 (Sepia Filter Transition) */
.fr-movie-img {
    transition: filter 0.5s ease, transform 0.5s ease;
    filter: sepia(0.3) contrast(1.1);
}

.fr-movie-img:hover {
    filter: sepia(0.8) contrast(1.2) brightness(0.9);
    transform: scale(1.03);
}

/* 5. 卡片hover胶片边框效果 (Film Border Animation) */
.fr-film-card {
    position: relative;
    background-color: #2c1e16;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    overflow: hidden;
}

.fr-film-card::before,
.fr-film-card::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    background-image: linear-gradient(to bottom, #1a110c 50%, transparent 50%);
    background-size: 100% 20px;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fr-film-card::before {
    left: -12px;
}

.fr-film-card::after {
    right: -12px;
}

.fr-film-card:hover {
    border-color: #8b5a2b;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    transform: translateY(-5px);
}

.fr-film-card:hover::before {
    opacity: 1;
    left: 0;
    transform: translateY(0);
    animation: fr-film-scroll 1s linear infinite;
}

.fr-film-card:hover::after {
    opacity: 1;
    right: 0;
    transform: translateY(0);
    animation: fr-film-scroll 1s linear infinite;
}

@keyframes fr-film-scroll {
    from { background-position: 0 0; }
    to { background-position: 0 20px; }
}

/* 6. 按钮hover复古发光效果 */
.fr-btn-retro {
    background-color: #8b5a2b;
    color: #f5deb3;
    transition: all 0.3s ease;
    border: 1px solid #a0522d;
}

.fr-btn-retro:hover {
    background-color: #a0522d;
    color: #fff;
    box-shadow: 0 0 15px rgba(212, 184, 134, 0.6);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 7. 链接hover下划线复古展开 */
.fr-link-retro {
    position: relative;
    color: #d4b886;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fr-link-retro::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: #d4b886;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.fr-link-retro:hover {
    color: #f5deb3;
}

.fr-link-retro:hover::after {
    width: 100%;
}

/* 8. 倒计时遮罩层样式 */
.fr-countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #110b08;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.fr-countdown-circle {
    width: 150px;
    height: 150px;
    border: 4px solid #d4b886;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.fr-countdown-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #d4b886;
    animation: fr-reel-spin 1s linear infinite;
}

.fr-countdown-circle::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background-color: #d4b886;
    animation: fr-reel-spin 1s linear infinite;
}

.fr-countdown-number {
    font-size: 80px;
    font-weight: bold;
    color: #d4b886;
    font-family: 'Courier New', Courier, monospace;
    z-index: 2;
    background-color: #110b08;
    width: 100px;
    height: 100px;
    text-align: center;
    line-height: 100px;
    border-radius: 50%;
}

/* 9. 胶片帧编号overlay */
.fr-frame-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #d4b886;
    padding: 2px 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    border: 1px solid #d4b886;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fr-movie-img-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.fr-movie-img-container:hover .fr-frame-overlay {
    opacity: 1;
}
